package com.hengxinyongli.zeus.common.constant;

/**
 * 终端枚举 1-苹果 2-安卓 3-PC 4-H5
 *
 *
 * @date 2018/4/23
 */
public enum TerminalEnum {

    IOS((byte) 1, "苹果"),

    ANDROID((byte) 2, "安卓"),

    PC((byte) 3, "PC"),

    H5((byte) 4, "H5");

    private final byte value;
    private final String desc;

    TerminalEnum(byte value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public byte getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static TerminalEnum valueOf(int value) {
        for (TerminalEnum p : values()) {
            if (p.getValue() == value) {
                return p;
            }
        }

        return null;
    }
}
